import req from './index';

const BASE_URL = '/api';

/**
 * 考场管理
 */
//添加考场
export const addTestRoom = (param)=>{return req(param,`${BASE_URL}/testRoom/addTestRoom`,"post")};

//删除考场
export const deleteTestRoom = (param)=>{return req(param,`${BASE_URL}/testRoom/deleteTestRoom`,"post")};

//编辑考场
export const updateTestRoom = (param)=>{return req(param,`${BASE_URL}/testRoom/updateTestRoom`,"post")};

//查询考场
export const selectTestRoom = (param)=>{return req(param,`${BASE_URL}/testRoom/selectTestRoom`,"post")};

//查询申请进入考场的考生信息
export const selectUnRoomUser = (param)=>{return req(param,`${BASE_URL}/testRoom/selectUnRoomUser`,"post")};



//根据id查询考场信息
export const selectTestRoomById = (param)=>{return req(param,`${BASE_URL}/testRoom/selectTestRoomById`,"post")};

//分页查询指定考场中的考题信息
export const selectRoomPaperByTrId = (param)=>{return req(param,`${BASE_URL}/roomPaper/selectRoomPaperByTrId`,"post")};

//分页查询查询指定考场中的考题信息（包含考试状态）
export const selectRoomPaperByTrIdAndUser = (param)=>{return req(param,`${BASE_URL}/roomPaper/selectRoomPaperByTrIdAndUser`,"post")};


//编辑考试信息
export const updateRoomPaper = (param) =>{return req(param,`${BASE_URL}/roomPaper/updateRoomPaper`,"post")};

//删除指定的考试信息
export const deleteRoomPaper = (param)=>{return req(param,`${BASE_URL}/roomPaper/deleteRoomPaper`,"post")};

//在考场中添加考题
export const addRoomPaper = (param)=>{return req(param,`${BASE_URL}/roomPaper/addRoomPaper`,"post")};


/**
 * 考生申请
 */
//同意考生加入到指定考场
export const allowUser = (param)=>{return req(param,`${BASE_URL}/roomUser/allowUser`,"post")};

//删除考生的申请信息
export const deleteAllowUser = (param)=>{return req(param,`${BASE_URL}/roomUser/deleteAllowUser`,"post")};

// //监考删除已同意的考生
export const deleteAlreadyUser = (param)=>{return req(param,`${BASE_URL}/roomUser/deleteAlreadyUser`,"post")};

/**
 * 考生信息
 */
export const getRoomUserInfo = (param)=>{return req(param,`${BASE_URL}/roomUser/getRoomUserInfo`,"post")};

/**
 * 试题
 */
//生成试题
export const addExaminationPaper = (param)=>{return req(param,`${BASE_URL}/examinationPaper/addExaminationPaper`,"post")};

//根据条件获取生成的试题
export const getExaminationPaper = (param)=>{return req(param,`${BASE_URL}/examinationPaper/getExaminationPaper`,"post")};

//根据id获取试题的详细信息
export const getExaminationPaperById = (param)=>{return req(param,`${BASE_URL}/examinationPaper/getExaminationPaperById`,"post")};

//根据id获取试题的信息（不包括答案）
export const getNoAnswerExaminationPaperById = (param)=>{return req(param,`${BASE_URL}/examinationPaper/getNoAnswerExaminationPaperById`,"post")};

//根据id修改试题信息
export const updateExaminationById = (param) =>{return req(param,`${BASE_URL}/examinationPaper/updateExaminationById`,"post")};

//根据id批量删除试题
export const deleteExaminationById = (param)=>{return req(param,`${BASE_URL}/examinationPaper/deleteExaminationById`,"post")};



//学生查询要申请的考场信息
export const getStudentApply = (param)=>{return req(param,`${BASE_URL}/roomUser/getStudentApply`,"post")};

//考生删除申请信息
export const deleteApplyTestRoom = (param)=>{return req(param,`${BASE_URL}/roomUser/deleteApplyTestRoom`,"post")};

//考生申请进入指定的考场
export const agreeApplyTestRoom = (param)=>{return req(param,`${BASE_URL}/roomUser/agreeApplyTestRoom`,"post")};


//考生查询已进入的考场
export const getAlreadyTestRooInfo = (param)=>{return req(param,`${BASE_URL}/roomUser/getAlreadyTestRooInfo`,"post")};

//考生退出指定的考场
export const exitAlreadyTestRoom = (param)=>{return req(param,`${BASE_URL}/roomUser/exitAlreadyTestRoom`,"post")};

//改卷
export const rewinding = (param)=>{return req(param,`${BASE_URL}/examinationPaper/rewinding`,"post")};

//成绩统计
export const testScoreResult = (param)=>{return req(param,`${BASE_URL}/testScoreResult/testScoreResult`,"post")};

//分数统计
export const getRefererInfo = (param)=>{return req(param,`${BASE_URL}/testScoreResult/getRefererInfo`,"post")};

//成绩单
export const scoreStatistics = (param)=>{return req(param,`${BASE_URL}/testScoreResult/scoreStatistics`,"post")};

//成绩统计
export const getScoreStatistics = (param)=>{return req(param,`${BASE_URL}/testScoreResult/getScoreStatistics`,"post")};

//获取个人成绩信息
export const getScoreStatisticsByRpIdAndId = (param)=>{return req(param,`${BASE_URL}/testScoreResult/getScoreStatisticsByRpIdAndId`,"post")};
